#include <stdio.h>

int suan(unsigned int num)
{
	int count = 0; 
	while(num)
	{
		if(num % 2)
		{
			count++;
		}
		num /= 2;
	}
	return count;
}

int main()
{
	int num = 0;
	scanf("%d", &num);
	printf("%d ", suan(num));
	return 0;
}


